package book.service.impl;

import book.dao.privilegesDao;
import book.dao.roleDao;
import book.entity.privileges;
import book.entity.role;
import book.entity.role_privileges;
import book.service.PrivilegesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class privilegesServicesImpl implements PrivilegesService{

    @Autowired
    privilegesDao privilegesDao;


    @Override
    public List<privileges> getAll() {
        return privilegesDao.getAll();
    }

    public void delete(int id){
        privilegesDao.deleteEntity(id);
    }

    @Override
    public privileges getById(int id) {

        return privilegesDao.getById(id);
    }

    @Override
    public int getCount() {
        return 0;
    }

    @Override
    public void insert(role_privileges role) {
        privilegesDao.insert(role);
    }

}
